package com.xilihui.xlh.business.requests;

import com.xilihui.xlh.business.entities.AccountEntity;
import com.xilihui.xlh.business.entities.BillDetailsEntity;
import com.xilihui.xlh.business.entities.CreditEntity;
import com.xilihui.xlh.business.entities.IntegralEntity;
import com.xilihui.xlh.business.entities.LoginEntity;
import com.xilihui.xlh.business.entities.StoreBillDetailsEntity;
import com.xilihui.xlh.business.entities.UserEntity;
import com.xilihui.xlh.business.entities.WithdrawDetailEntity;
import com.xilihui.xlh.business.entities.WithdrawEntity;
import com.xilihui.xlh.business.entities.WithdrawRecordEntity;
import com.xilihui.xlh.core.app.BaseEntity;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2018/7/3.
 */

public interface MineService {
    
    //提现信息
    @FormUrlEncoded
    @POST("/api/user/application_cash")
    Observable<WithdrawEntity> withdrawInfo(
            @Field("access_token") String access_token
    );
    
    //提现申请-提交
    @FormUrlEncoded
    @POST("/api/user/submit_application_cash")
    Observable<BaseEntity> applySubmit(
            @Field("access_token") String access_token,
            @Field("money") String money,
            @Field("bank_name") String bank_name,
            @Field("bank_card") String bank_card,
            @Field("realname") String realname,
            @Field("province") String province,
            @Field("city") String city,
            @Field("subordinate") String subordinate,
            @Field("type") String type
    );
    
    //账户信息
    @FormUrlEncoded
    @POST("/api/user/center")
    Observable<UserEntity> userInfo(
            @Field("access_token") String access_token
    );
    
    //账户信息修改
    @FormUrlEncoded
    @POST("/api/user/change_info")
    Observable<BaseEntity> userSave(
            @Field("access_token") String access_token,
            @Field("type") String type,
            @Field("field") String field
    );
    
    //信用分
    @FormUrlEncoded
    @POST("/api/credit/index")
    Observable<CreditEntity> credit(
            @Field("access_token") String acess_token,
            @Field("page") int page
    );
    
    //我的
    @FormUrlEncoded
    @POST("api/user/index")
    Observable<LoginEntity> mine(
            @Field("access_token") String access_token  
    );
    
    //我的积分
    @FormUrlEncoded
    @POST("api/account/index")
    Observable<IntegralEntity> integral(
           @Field("access_token") String access_token,
           @Field("page") int page,
           @Field("type") String type
    );
    
    //提现记录
    @FormUrlEncoded
    @POST("api/withdrawals/index")
    Observable<WithdrawRecordEntity> withdrawRecord(
            @Field("access_token") String access_token,
            @Field("page") int page,
            @Field("status") String status
    );
    
    //提现详情
    @FormUrlEncoded
    @POST("api/withdrawals/detail")
    Observable<WithdrawDetailEntity> detail(
            @Field("access_token") String access_token,
            @Field("id") String id
    );
    
    //账单列表
    @FormUrlEncoded
    @POST("api/commission_user/index")
    Observable<AccountEntity> accountList(
           @Field("access_token") String access_token,
           @Field("page") int page,
           @Field("type") String type
    );
    
    //账单详情
    @FormUrlEncoded
    @POST("api/commission_user/get_by_id")
    Observable<BillDetailsEntity> billDetail(
            @Field("access_token") String access_token,
            @Field("id") String id
    );
    
    //商品的账单详情
    @FormUrlEncoded
    @POST("/api/commission_user/get_shop_commission")
    Observable<StoreBillDetailsEntity> storebillDetail(
            @Field("access_token") String access_token,
            @Field("id") String id
    );
    
    
}
